package com.pkx.guide.common.constant;

import java.util.HashMap;
import java.util.Map;
import java.util.Timer;
import java.util.concurrent.ConcurrentHashMap;

/**
 * 通用常量信息
 * 
 * @author sunsy
 */
public class Constants {
    /**
     * UTF-8 字符集
     */
    public static final String UTF8 = "UTF-8";

    /**
     * GBK 字符集
     */
    public static final String GBK = "GBK";

    /**
     * RMI 远程方法调用
     */
    public static final String LOOKUP_RMI = "rmi:";

    /**
     * LDAP 远程方法调用
     */
    public static final String LOOKUP_LDAP = "ldap:";

    /**
     * LDAPS 远程方法调用
     */
    public static final String LOOKUP_LDAPS = "ldaps:";

    /**
     * http请求
     */
    public static final String HTTP = "http://";

    /**
     * https请求
     */
    public static final String HTTPS = "https://";

    /**
     * 成功标记
     */
    public static final Integer SUCCESS = 200;

    /**
     * 失败标记
     */
    public static final Integer FAIL = 500;

    /**
     * 登录成功
     */
    public static final String LOGIN_SUCCESS = "Success";

    /**
     * 登录成功
     */
    public static final String LOGIN_SUCCESS_NAME = "登录成功";

    /**
     * 注销
     */
    public static final String LOGOUT = "Logout";

    /**
     * 注销
     */
    public static final String LOGOUT_NAME = "退出登录";

    /**
     * 注册
     */
    public static final String REGISTER = "Register";

    /**
     * 登录失败
     */
    public static final String LOGIN_FAIL = "Error";

    /**
     * 当前记录起始索引
     */
    public static final String PAGE_NUM = "pageNum";

    /**
     * 每页显示记录数
     */
    public static final String PAGE_SIZE = "pageSize";

    /**
     * 排序列
     */
    public static final String ORDER_BY_COLUMN = "orderByColumn";

    /**
     * 排序的方向 "desc" 或者 "asc".
     */
    public static final String IS_ASC = "isAsc";

    /**
     * 验证码 redis key
     */
    public static final String CAPTCHA_CODE_KEY = "captcha_codes:";

    /**
     * 验证码有效期（分钟）
     */
    public static final long CAPTCHA_EXPIRATION = 2;


    /**
     * 参数管理 cache key
     */
    public static final String SYS_CONFIG_KEY = "sys_config:";

    /**
     * 字典管理 cache key
     */
    public static final String SYS_DICT_KEY = "sys_dict:";

    /**
     * 资源映射路径 前缀
     */
    public static final String RESOURCE_PREFIX = "/profile";

    /**
     * 定时任务白名单配置（仅允许访问的包名，如其他需要可以自行添加）
     */
    public static final String[] JOB_WHITELIST_STR = { "com.ruoyi" };

    /**
     * 定时任务违规的字符
     */
    public static final String[] JOB_ERROR_STR = { "java.net.URL", "javax.naming.InitialContext", "org.yaml.snakeyaml",
            "org.springframework", "org.apache", "com.ruoyi.common.core.utils.file" };

    /**
     * 全部数据权限
     */
    public static final String DATA_SCOPE_ALL = "1";

    /**
     * 科室数据权限
     */
    public static final String DATA_SCOPE_DEPT = "2";

    /**
     * 承包单位数据权限
     */
    public static final String DATA_SCOPE_COMPANY = "3";

    /**
     * 本人数据权限
     */
    public static final String DATA_SCOPE_SELF = "4";

    /**
     * 自定数据权限
     */
    public static final String DATA_SCOPE_CUSTOM = "5";

    /**
     * 总包单位
     */
    public static final String DEPT_CODE_ZBDW = "JJ_ZBDW";

    /**
     * 存储总金额明细表名前缀
     */
    public static final String MIN_FEE_TABLE_PREFIX = "t_info_min_fee_";

    /**
     * 存储分省金额表名前缀
     */
    public static final String PROV_FEE_TABLE_PREFIX = "t_info_prov_fee_";

    /**
     * 存储门架明细表名前缀
     */
    public static final String PROV_GROUP_TABLE_PREFIX = "t_info_prov_group_";

    /**
     * 用于缓存已发布的timer
     */
    public static final ConcurrentHashMap<Integer, Timer> guidePublishTimerMap = new ConcurrentHashMap<>();
}
